<template>
    <div class="captcha_box">
        <div>
            <van-nav-bar title="" left-text="" right-text="" left-arrow @click-left="back" />
        </div>

        <van-cell class="text" :border="false" center title="设置登录密码"  />

        <div class="inputBox">

            <van-form @submit="onSubmit">
            <!--带密码可见功能的密码输入框-->
                <password-field v-model="password"  placeholder="6-20位密码，至少含字母及数字"></password-field>
                <div class="btn">
                    <van-button  round color="#ff7b57" block type="info" native-type="submit" size="large">确定</van-button>
                </div>
            </van-form>
        
        </div>
    </div>
</template>

<script>
import Vue from 'vue';
import { Toast } from 'vant';
import PasswordField from "../../components/setting/ComAccountSecurity/ComPass.vue";
Vue.use(Toast);
export default {
    name: "SetLoginPassword",
    components: {
        PasswordField,
      },
    data(){
        return{
            password:'',//当前输入框的值
        }
    },
    methods:{
        back() {
            this.$router.go(-1)
        },


        onSubmit(){
            console.log('password:', this.password)
            Toast('设置成功');
            this.$router.push({ path:'/accounts'})
        },
        
    }
}
</script>

<style scoped>
    .text{
        font-size: 24px;
    }
    .btn{
    margin: 80px auto ;
    }
    .inputBox{
        margin: 50px auto ;
        width: 92%;
    }


</style>
